/* eslint-disable no-unused-vars */
import Mock from 'mockjs'

const mock = Mock.mock

export default [
  {
    url: '/api/system/post',
    type: 'get',
    response: (config) => {
      return mock({
        code: 200,
        data: {
          page: 1,
          limit: 20,
          total: 4,
          'list|4': [
            {
              'postName|+1': ['小工', '中工', '大工', '电工'],
              'postWage|+1': [260, 340, 390, 450],
              createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
              id: '@id',
              'status|1-2': 1
            }
          ]
        },
        message: 'success'
      })
    }
  },
  {
    url: '/api/system/dept',
    type: 'get',
    response: (config) => {
      return mock({
        code: 200,
        data: {
          page: 1,
          limit: 20,
          total: 5,
          'list|5': [
            {
              'name|+1': ['一组', '二组', '三组', '四组', '电工组'],
              deptCode: '@id',
              createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
              id: '@id',
              status: 1
            }
          ]
        },
        message: 'success'
      })
    }
  },
  {
    url: '/api/system/staff',
    type: 'get',
    response: (config) => {
      return mock({
        code: 200,
        data: {
          page: 1,
          limit: 20,
          total: 222,
          'list|20': [
            {
              'name|1': ['张三', '李四', '王五', '赵六', '田七'],
              phone: '@integer(100000000, 200000000)',
              id: '@id',
              'sex|1-2': 1,
              'role|1-2': 1,
              'post|1-4': 1,
              dailyWage: 260,
              'status|1-2': 2,
              'dept|1': ['一组', '二组'],
              createTime: '@datetime("yyyy-MM-dd HH:mm:ss")'
            }
          ]
        },
        message: 'success'
      })
    }
  },
  {
    url: '/api/system/share',
    type: 'get',
    response: (config) => {
      return mock({
        code: 200,
        data: [
          {
            id: '@id',
            createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
            name: '组长分成',
            type: 1,
            date: '2024-01-01至2027-01-01',
            value: 10
          },
          {
            id: '@id',
            createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
            name: '经理分成',
            type: 2,
            date: '2024-01-01至2027-01-01',
            value: 50
          }
        ],
        message: 'success'
      })
    }
  }
]
